import httpInstance from "@/utils/http.js";

//订单支付
export function alipay(order){
    return httpInstance({
        baseURL:'http://localhost:8081',
        url:`/pay`,
        method:'post',
        data:order,
        headers: {
            'Content-Type': 'application/json',
        }
    })
}
//查询订单交易状态
export function getTradeStatusAPI(oid){
    return httpInstance({
        baseURL:'http://localhost:8081',
        url:`/check`,
        method:'get',
        params:{
            oid:oid
        }
    })
}
//退款
export function refundAPI(order){
    return httpInstance({
        baseURL:'http://localhost:8081',
        url:`/refund`,
        method:'post',
        data:order,
        headers: {
            'Content-Type': 'application/json',
        }
    })
}